\hypertarget{skpng_8h}{
\section{skpng.h File Reference}
\label{skpng_8h}\index{skpng.h@{skpng.h}}
}
{\ttfamily \#include $<$png.h$>$}\par
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structskpng__image__info__str}{skpng\_\-image\_\-info\_\-str}
\item 
struct \hyperlink{structskpng__image__str}{skpng\_\-image\_\-str}
\item 
struct \hyperlink{structskpng__image__color__layer__str}{skpng\_\-image\_\-color\_\-layer\_\-str}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{structskpng__image__info__str}{skpng\_\-image\_\-info\_\-str} \hyperlink{skpng_8h_ac7fb1f6190cd582cce5463a55cac57ae}{skpng\_\-image\_\-info}
\item 
typedef struct \hyperlink{structskpng__image__str}{skpng\_\-image\_\-str} \hyperlink{skpng_8h_a4db630cd960da044c72d53365584401d}{skpng\_\-image}
\item 
typedef struct \hyperlink{structskpng__image__color__layer__str}{skpng\_\-image\_\-color\_\-layer\_\-str} \hyperlink{skpng_8h_af4a76b69f6d742964f8bbc6783193181}{skpng\_\-image\_\-color\_\-layer}
\item 
typedef \hyperlink{structskpng__image__color__layer__str}{skpng\_\-image\_\-color\_\-layer} \hyperlink{skpng_8h_a9baf1628f42a40fcc6bcabda59dfdd49}{skpng\_\-icl}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structskpng__image__color__layer__str}{skpng\_\-icl} \hyperlink{skpng_8h_a5f5c1a639d284212ece43058a05c97e0}{skpng\_\-formula\_\-alphablending} (\hyperlink{structskpng__image__color__layer__str}{skpng\_\-icl} $\ast$, \hyperlink{structskpng__image__color__layer__str}{skpng\_\-icl} $\ast$, float)
\item 
int \hyperlink{skpng_8h_a2d1e41e7f979a55bfc7b0847b1021c4d}{skpng\_\-proceed\_\-merge} (\hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$, \hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$, \hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$, float)
\item 
int \hyperlink{skpng_8h_a738c777cabb4882b0986fbd97a0834d3}{skpng\_\-proceed\_\-extractdiff} (\hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$, \hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$, \hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$, float, int)
\item 
int \hyperlink{skpng_8h_a25b0e4e64e6839aa8fcb72eaf3f9d491}{skpng\_\-read} (char $\ast$, \hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$)
\item 
int \hyperlink{skpng_8h_aac7d77ca23c33050c3851b46c7259a0d}{skpng\_\-prepare\_\-output\_\-file} (char $\ast$, \hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$)
\item 
int \hyperlink{skpng_8h_aea43a2747ff90999c3b23330b09c6a60}{skpng\_\-write} (char $\ast$, \hyperlink{structskpng__image__str}{skpng\_\-image} $\ast$)
\item 
void \hyperlink{skpng_8h_a8121993603ee093935ebebf48cc4d6c3}{skpng\_\-png\_\-version\_\-info} (void)
\end{DoxyCompactItemize}


\subsection{Typedef Documentation}
\hypertarget{skpng_8h_a9baf1628f42a40fcc6bcabda59dfdd49}{
\index{skpng.h@{skpng.h}!skpng\_\-icl@{skpng\_\-icl}}
\index{skpng\_\-icl@{skpng\_\-icl}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-icl}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf skpng\_\-image\_\-color\_\-layer} {\bf skpng\_\-icl}}}
\label{skpng_8h_a9baf1628f42a40fcc6bcabda59dfdd49}
\hypertarget{skpng_8h_a4db630cd960da044c72d53365584401d}{
\index{skpng.h@{skpng.h}!skpng\_\-image@{skpng\_\-image}}
\index{skpng\_\-image@{skpng\_\-image}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf skpng\_\-image\_\-str}  {\bf skpng\_\-image}}}
\label{skpng_8h_a4db630cd960da044c72d53365584401d}
Image data + info \hypertarget{skpng_8h_af4a76b69f6d742964f8bbc6783193181}{
\index{skpng.h@{skpng.h}!skpng\_\-image\_\-color\_\-layer@{skpng\_\-image\_\-color\_\-layer}}
\index{skpng\_\-image\_\-color\_\-layer@{skpng\_\-image\_\-color\_\-layer}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-image\_\-color\_\-layer}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf skpng\_\-image\_\-color\_\-layer\_\-str}  {\bf skpng\_\-image\_\-color\_\-layer}}}
\label{skpng_8h_af4a76b69f6d742964f8bbc6783193181}
RGBA info use for color manipulation \hypertarget{skpng_8h_ac7fb1f6190cd582cce5463a55cac57ae}{
\index{skpng.h@{skpng.h}!skpng\_\-image\_\-info@{skpng\_\-image\_\-info}}
\index{skpng\_\-image\_\-info@{skpng\_\-image\_\-info}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-image\_\-info}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf skpng\_\-image\_\-info\_\-str}  {\bf skpng\_\-image\_\-info}}}
\label{skpng_8h_ac7fb1f6190cd582cce5463a55cac57ae}
Needed information about libpng structure 

\subsection{Function Documentation}
\hypertarget{skpng_8h_a5f5c1a639d284212ece43058a05c97e0}{
\index{skpng.h@{skpng.h}!skpng\_\-formula\_\-alphablending@{skpng\_\-formula\_\-alphablending}}
\index{skpng\_\-formula\_\-alphablending@{skpng\_\-formula\_\-alphablending}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-formula\_\-alphablending}]{\setlength{\rightskip}{0pt plus 5cm}{\bf skpng\_\-icl} skpng\_\-formula\_\-alphablending (
\begin{DoxyParamCaption}
\item[{{\bf skpng\_\-icl} $\ast$}]{ RGBA, }
\item[{{\bf skpng\_\-icl} $\ast$}]{ rgba, }
\item[{float}]{ alphafactor}
\end{DoxyParamCaption}
)}}
\label{skpng_8h_a5f5c1a639d284212ece43058a05c97e0}
Compute RGBA channel to make alphablending \char`\"{}beautiful\char`\"{}


\begin{DoxyParams}{Parameters}
\item[{\em RGBA}]Chanel value of background image \item[{\em rgba}]Chanel value of foreground image \item[{\em alphafactor}]Factor of transparency \end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
\hypertarget{skpng_8h_a8121993603ee093935ebebf48cc4d6c3}{
\index{skpng.h@{skpng.h}!skpng\_\-png\_\-version\_\-info@{skpng\_\-png\_\-version\_\-info}}
\index{skpng\_\-png\_\-version\_\-info@{skpng\_\-png\_\-version\_\-info}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-png\_\-version\_\-info}]{\setlength{\rightskip}{0pt plus 5cm}void skpng\_\-png\_\-version\_\-info (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{skpng_8h_a8121993603ee093935ebebf48cc4d6c3}
Return current and compiled version of libpng \hypertarget{skpng_8h_aac7d77ca23c33050c3851b46c7259a0d}{
\index{skpng.h@{skpng.h}!skpng\_\-prepare\_\-output\_\-file@{skpng\_\-prepare\_\-output\_\-file}}
\index{skpng\_\-prepare\_\-output\_\-file@{skpng\_\-prepare\_\-output\_\-file}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-prepare\_\-output\_\-file}]{\setlength{\rightskip}{0pt plus 5cm}int skpng\_\-prepare\_\-output\_\-file (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{ filename, }
\item[{{\bf skpng\_\-image} $\ast$}]{ image1}
\end{DoxyParamCaption}
)}}
\label{skpng_8h_aac7d77ca23c33050c3851b46c7259a0d}
Prepare the output file from a model \char`\"{}image1\char`\"{}


\begin{DoxyParams}{Parameters}
\item[{\em filename}]Name of the output file \item[{\em image1}]Image data in skpng format \end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
\hypertarget{skpng_8h_a738c777cabb4882b0986fbd97a0834d3}{
\index{skpng.h@{skpng.h}!skpng\_\-proceed\_\-extractdiff@{skpng\_\-proceed\_\-extractdiff}}
\index{skpng\_\-proceed\_\-extractdiff@{skpng\_\-proceed\_\-extractdiff}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-proceed\_\-extractdiff}]{\setlength{\rightskip}{0pt plus 5cm}int skpng\_\-proceed\_\-extractdiff (
\begin{DoxyParamCaption}
\item[{{\bf skpng\_\-image} $\ast$}]{ image1\_\-ptr, }
\item[{{\bf skpng\_\-image} $\ast$}]{ image2\_\-ptr, }
\item[{{\bf skpng\_\-image} $\ast$}]{ imageO\_\-ptr, }
\item[{float}]{ alpha\_\-percent, }
\item[{int}]{ bgcolor}
\end{DoxyParamCaption}
)}}
\label{skpng_8h_a738c777cabb4882b0986fbd97a0834d3}
Extract the diff between image1 \& image2 and put it in imageO

\begin{Desc}
\item[\hyperlink{todo__todo000002}{Todo}]alphapercent and bgcolor are not used in this version \end{Desc}

\begin{DoxyParams}{Parameters}
\item[{\em image1\_\-ptr}]Image data in skpng format \item[{\em image2\_\-ptr}]Image data in skpng format \item[{\em imageO\_\-ptr}]Data of image0 in skpng format \item[{\em alpha\_\-percent}]Factor of transparency (not used) \item[{\em bgcolor}]Background color (not used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
Extract the diff between image1 \& image2 and put it in imageO

\begin{Desc}
\item[\hyperlink{todo__todo000001}{Todo}]alphapercent and bgcolor are not used in this version \end{Desc}

\begin{DoxyParams}{Parameters}
\item[{\em image1\_\-ptr}]Image data in skpng format \item[{\em image2\_\-ptr}]Image data in skpng format \item[{\em imageO\_\-ptr}]Data of image0 in skpng format \item[{\em alpha\_\-percent}]Factor of transparency (not used) \item[{\em bgcolor}]Background color (not used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
\hypertarget{skpng_8h_a2d1e41e7f979a55bfc7b0847b1021c4d}{
\index{skpng.h@{skpng.h}!skpng\_\-proceed\_\-merge@{skpng\_\-proceed\_\-merge}}
\index{skpng\_\-proceed\_\-merge@{skpng\_\-proceed\_\-merge}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-proceed\_\-merge}]{\setlength{\rightskip}{0pt plus 5cm}int skpng\_\-proceed\_\-merge (
\begin{DoxyParamCaption}
\item[{{\bf skpng\_\-image} $\ast$}]{ image1\_\-ptr, }
\item[{{\bf skpng\_\-image} $\ast$}]{ image2\_\-ptr, }
\item[{{\bf skpng\_\-image} $\ast$}]{ imageO\_\-ptr, }
\item[{float}]{ alpha\_\-percent}
\end{DoxyParamCaption}
)}}
\label{skpng_8h_a2d1e41e7f979a55bfc7b0847b1021c4d}
Merge two images in one. The second will apply an alphablending operation


\begin{DoxyParams}{Parameters}
\item[{\em image1\_\-ptr}]Image data in skpng format \item[{\em image2\_\-ptr}]Image data in skpng format \item[{\em imageO\_\-ptr}]Image data in skpng format \item[{\em alpha\_\-percent}]Factor of transparency (not used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
\hypertarget{skpng_8h_a25b0e4e64e6839aa8fcb72eaf3f9d491}{
\index{skpng.h@{skpng.h}!skpng\_\-read@{skpng\_\-read}}
\index{skpng\_\-read@{skpng\_\-read}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-read}]{\setlength{\rightskip}{0pt plus 5cm}int skpng\_\-read (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{ filename, }
\item[{{\bf skpng\_\-image} $\ast$}]{ image1}
\end{DoxyParamCaption}
)}}
\label{skpng_8h_a25b0e4e64e6839aa8fcb72eaf3f9d491}
Read a png file (RGBA only)


\begin{DoxyParams}{Parameters}
\item[{\em filename}]Name of file to read \item[{\em image1}]Image Data \end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
\hypertarget{skpng_8h_aea43a2747ff90999c3b23330b09c6a60}{
\index{skpng.h@{skpng.h}!skpng\_\-write@{skpng\_\-write}}
\index{skpng\_\-write@{skpng\_\-write}!skpng.h@{skpng.h}}
\subsubsection[{skpng\_\-write}]{\setlength{\rightskip}{0pt plus 5cm}int skpng\_\-write (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{ filename, }
\item[{{\bf skpng\_\-image} $\ast$}]{ image1}
\end{DoxyParamCaption}
)}}
\label{skpng_8h_aea43a2747ff90999c3b23330b09c6a60}
Write the png file


\begin{DoxyParams}{Parameters}
\item[{\em filename}]Name of file \item[{\em image1}]Image data \end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
